//
//  NetShare.h
//  u76ho
//
//  Created by m-air-01 on 16/1/15.
//  Copyright © 2016年 LV. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "AFNetworking.h"

typedef void (^finishBlock)(id responstObj);
typedef void (^failedBlock)(NSString * errorMsg);
@class NetShare;
@interface NetShare : NSObject

NetShare * request(void);

@property (nonatomic,strong) AFHTTPRequestOperationManager * manager;//管理类
//@property (nonatomic,assign) NSInteger count;//统计发起网络个数
@property (nonatomic,strong) NSString * cookie;//设置cookie
@property (nonatomic,assign) BOOL isWaiting;//加载等待状态
@property (nonatomic,strong) NSMutableDictionary * waitingPool;//存储所有网络加载等待状态
@property (nonatomic,assign) BOOL isLogin;//判断登录状态


+(NetShare *)shareNet;

- (void)POST_URL:(NSString *)url pram:(NSDictionary * )dic finished:(finishBlock)finishedBlcok failed:(failedBlock)failBlock;
- (void)GET_URL:(NSString *)url pram:(NSDictionary * )dic finished:(finishBlock)finishedBlcok failed:(failedBlock)failBlock;
- (void)PUT_URL:(NSString *)url pram:(id)dic finished:(finishBlock)finishedBlcok failed:(failedBlock)failBlock;
- (void)DELETE_URL:(NSString *)url pram:(NSDictionary * )dic finished:(finishBlock)finishedBlcok failed:(failedBlock)failBlock;
- (void)POST_URL:(NSString *)url updataImage:(UIImage *)image pram:(NSDictionary * )dic finished:(finishBlock)finishedBlcok failed:(failedBlock)failBlock;

@end
